<table class="inventory_table">
  <tr>
    <th class="info_cell">Имя</th>
    <th class="info_cell">День рождения</th>
    <th class="info_cell">Номер телефона</th>
    <th class="photo_cell">Фото</th>
    <th colspan="2">&nbsp;</th>
  </tr>
</table>

{foreach from=$ITEMS item=inventoryClient}
  <div class="interactive_row">
    <table class="inventory_table info_row">
      <tr>
        <td class="info_cell">
          <a href="/client-info.html?id={$inventoryClient->GetId()}" title="Просмотр информации о клиенте">
            {$inventoryClient->GetName()}
          </a>
        </td>
        <td class="info_cell">{$inventoryClient->GetBirthday()}</td>
        <td class="info_cell">{$inventoryClient->GetPhoneNumber()}</td>
        <td class="photo_cell">
          <img alt="Фото" src="{if $inventoryClient->GetPhotoLink() == ""}/images/icon-author.png{else}{$inventoryClient->GetPhotoLink()}{/if}" />
        </td>
        <td class="edit_cell"><input class="edit_button"   type="button" value="Изменить" /></td>
        <td class="edit_cell"><input class="delete_button" type="button" value="Удалить" /></td>
      </tr>
    </table>

    <form method="post" class="form_row hidden" action="/clients.html">
      <table class="inventory_table">
        <tr>
          <td class="info_cell"><input class="input_field" name="name" value="{$inventoryClient->GetName()}" type="text" /></td>
          <td class="info_cell"><input class="input_field" name="birthday" value="{$inventoryClient->GetBirthday()}" type="text" /></td>
          <td class="info_cell"><input class="input_field" name="phone_number" value="{$inventoryClient->GetPhoneNumber()}" type="text" /></td>
          <td class="photo_cell"><input id="photo{$inventoryClient->GetId()}" name="photo{$inventoryClient->GetId()}" type="file" /></td>
          <td class="edit_cell">
            <input type="hidden" name="photo_link" value="{$inventoryClient->GetPhotoLink()}" />
            <input type="hidden" name="id" value="{$inventoryClient->GetId()}" />
            <input type="hidden" name="action" value="update" />
            <input class="update_button" type="submit" value="Изменить" />
          </td>
          <td class="edit_cell"><input class="cancel_button" type="button" value="Отмена" /></td>
        </tr>
      </table>
    </form>
  </div>
{foreachelse}
  <table class="inventory_table">
    <tr>
      <td colspan="6">
        Записей нет.
      </td>
    </tr>
  </table>
{/foreach}

<form method="post" class="form_row" action="/clients.html">
  <table class="inventory_table last">
    <tr>
      <td class="info_cell"><input class="input_field" name="name" value="" type="text" /></td>
      <td class="info_cell"><input class="input_field" name="birthday" value="" type="text" /></td>
      <td class="info_cell"><input class="input_field" name="phone_number" value="" type="text" /></td>
      <td class="photo_cell"><input id="photo" name="photo" type="file" /></td>
      <td colspan="2">
        <input type="hidden" name="photo_link" value="" />
        <input type="hidden" name="action" value="create" />
        <input class="add_button" type="submit" value="Добавить" />
      </td>
    </tr>
  </table>
</form>